/*
 * @Author: KKKKKK
 * @Date: 2021-01-10 12:08:35
 * @LastEditors: KKKKKK
 * @LastEditTime: 2021-01-10 12:08:35
 */
import axios from './config'
import url from './url'
const baseUrl = process.env.VUE_APP_BASE_URL

/* 需求竞标 */
// 新增需求竞标
const reqBiddingCreate = (params) => axios.post(baseUrl + url.reqBidding.create, params)

// 删除需求竞标
const reqBiddingDelete = (id) => axios.delete(baseUrl + url.reqBidding.delete + `/${id}`)

// 修改需求竞标
const reqBiddingUpdate = (params, id) => axios.post(baseUrl + url.reqBidding.update + `/${id}`, params)

// 获取某个需求竞标
const reqBiddingLoad = (id) => axios.get(baseUrl + url.reqBidding.load + `/${id}`)

// 获取需求竞标列表
const reqBiddingPage = (params) => axios.get(baseUrl + url.reqBidding.page, { params })

export default {
    reqBiddingCreate,
    reqBiddingDelete,
    reqBiddingUpdate,
    reqBiddingLoad,
    reqBiddingPage,
}